package com.example.computer_exam_training_sys.service.impl;

import com.example.computer_exam_training_sys.entity.KnowledgePointInfo;
import com.example.computer_exam_training_sys.mapper.KnowledgePointMapper;
import com.example.computer_exam_training_sys.service.KnowledgePointService;
import org.apache.ibatis.annotations.Delete;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KnowledgePointServiceImpl implements KnowledgePointService {

    @Autowired
    private KnowledgePointMapper knowledgePointMapper;

    @Override
    public KnowledgePointInfo findById(int pointId) {
        return knowledgePointMapper.findById(pointId);
    }

    @Override
    public List<KnowledgePointInfo> findAll() {
        return knowledgePointMapper.findAll();
    }

    @Override
    public List<KnowledgePointInfo> findByCourse(int courseId) {
        return knowledgePointMapper.findByCourse(courseId);
    }

    @Override
    public Integer getFirstPointIdByCourseId(Integer courseId) {
        return knowledgePointMapper.getFirstPointIdByCourseId(courseId);
    }
}
